home *** CD-ROM | disk | FTP | other *** search
- Developer information
- ---------------------
-
- The following text describes, how to control a telescope with Digital Almanac II.
- Telescope control is only enabled, if you are a registered user, i.e you own a keyfile !!
-
-
- If you have some experience in programming the Amiga, no matter what language you prefer,
- it is very easy to read coordinates from DA.
-
- But don't expect too much !
- All DA does, is to feed a public messageport with its map's center coordinates !
- That's all !!
-
- You might ask, why not more ?
- The question is easy. That's all you need !
- Because of the variety of connecting a telescope control to a computer, you must write your
- own program to benefit from this feature.
- You either need a driver that sends coordinates to your telescope, or you must write your own
- driver depending what communication port you use. Generally this is either serial port or the
- parallel port.
-
-
-
- What must I do as a programmer ?
- --------------------------------
-
- * Create the public messageport "DA_Port".
- Check first, that this port doesn't already exist. DA is not able to support more than
- one task with the same name of a public messageport !!
-
- * Wait for messages to arrive at this port.
-
- * Read the message, handle the coordinates and reply the message.
-
- * Wait for next message ....
-
-
- The main part for you as a programmer is "to handle the coordinates". This is the point
- where you must send the coordinates to your telescope (or do whatever you like to).
-
-
-
- What must I do as a user ?
- --------------------------
-
- First start your control program that is to receive the messages, then start DA.
- This order is important as DA checks for an existing port named "DA_Port".
- If the port exists, then DA will extend the Telescope window with a new group containing
- two switches.
-
- The first switch is called "Send coordinates" and acts as a master switch.
- Setting this switch causes DA to send its center coordinates to "DA_Port".
- You are allowed to quit the receiving program any time you like. DA notices a remove of
- "DA_Port" and let you know by a requester. In this case you MUST start DA again, if you like
- to send its coordinates again.
- If the switch is off, nothing will be sent to the port.
-
- Note:
- You must run DA in the "Local Sky" mode to receive the correct azimuth and horizon angles.
- Running DA in "Planetarium" mode causes wrong coordinates !
-
- The second switch, called "Standby", tells DA, how to react, when your receiving program
- replies the message.
- If "Standby" is enabled, then DA will "Wait" for the reply after having sent the message,
- i.e. both tasks run syncronous.
- If the switch is off, then "DA" will not wait for the reply, i.e the tasks run asyncronous.
-
- Note: In reality you must set the animtion time interval to "Realtime" because you want your
- telescope to be moved in real time !!
-
-
-
- The "Example" program
- ---------------------
-
- This is a very simple example. It can be run both from CLI or from Workbench.
- As described above, first start the example, then start DA.
- * Open the Telescope window and you will see the two switches.
- * Turn the master switch on.
- * Load e.g. the "SolarEclipse1999" from the project folder.
- * Choose the "Standby" switch for syncronous or asyncronous mode.
- * Open the "Animation" window and start the animation.
- * Switch back to Workbench and you will see the map's center coordinates will be displayed.
- * Cancel the example by pressing CTRL-C in the output window any time you like.
-
- The source code of the example and the include file is written in C (C++).
- But according to its simpleness, the example can be easily converted to any other language.
-
-